package com.bocomm.tracevisualization.controller;


import com.bocomm.tracevisualization.api.result.Result;
import com.bocomm.tracevisualization.api.service.ITraceTargetDataDetailService;
import com.bocomm.tracevisualization.api.vo.req.SequenceDiagramReq;
import com.bocomm.tracevisualization.api.vo.resp.SequenceDiagram;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * traceroute的每一行返回值 前端控制器
 * </p>
 *
 * @author cxp
 * @since 2024-03-20
 */
@RestController
@RequestMapping("/api/traceTargetDataDetail")
public class TraceTargetDataDetailController {

    @Autowired
    ITraceTargetDataDetailService traceTargetDataDetailService;

    @PostMapping("/sequenceDiagram")
    public Result<SequenceDiagram> sequenceDiagram(@RequestBody SequenceDiagramReq targetIp){
        return Result.success(traceTargetDataDetailService.sequenceDiagram(targetIp.getTargetIp()));
    }
}
